<template>
  <div class="member-con">
    <div class="member">
      <div class="left">
        <div class="img" v-if="!staff.Image">
          <span>{{name}}</span>
        </div>
        <img :src="staff.Image" v-else/>
      </div>
      <div class="right">
        <div class="top">
          <span class="name">{{staff.Name}}</span><span><slot name="ops"></slot></span>
        </div>
        <div class="body">
          <slot name="body"></slot>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'HomeIcons',
    props:{
      "staff":{
        type: Object,
        required: true
      }
    },
    data() {
      return {
      }
    },
    methods:{
    },
    created(){
    },
    computed: {
      name(){
        if(this.staff && this.staff.Name&&this.staff.Name.length>2){
          return this.staff.Name.substring(0,2)
        }else if(this.staff){
          return this.staff.Name
        }else{
          return ""
        }
      }
    },
    components:{
    }
  }
</script>
<style lang="less" scoped>
.member-con .member 
{
  display: flex;
  align-items: center;
  .left{
    display: flex;
    align-items: center;
    justify-content: flex-start;;
    .img{
      //background-color:@color-main ;
      //width: @icon-size-1;
      //height: @icon-size-1;
      //min-width: @icon-size-1;
      //min-height: @icon-size-1;
      //max-height: @icon-size-1;
      //max-width: @icon-size-1;
      display: flex;
      justify-content: center;
      align-items: center;
      //color: @buttonDefaultColor;
      //border-radius: @border-radius-small;
    }
    img{
      //max-height: @icon-size-1;
      //max-width: @icon-size-1;
      //border-radius: @border-radius-small;
    }
    //padding-right: @block-img-text-x;
  }
  .right{
    .top{
      display: flex;
    }
    .body{
      //padding-top: @block-text-text-y;
      //color:@fontColor2;
      padding-top: 0;
    }
  }
}
</style>